#region Using directives

using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;

#endregion

namespace Hanoi
{
    /// <summary>
    /// Summary description for FormConfig.
    /// </summary>
    public class FormOptions : System.Windows.Forms.Form
    {
        protected MenuItem mnuPrevious;
        protected MenuItem mnuNext;
        protected Panel pnOptions;
        protected Label lblInfo;
        /// <summary>
        /// Main menu for the form.
        /// </summary>
        private System.Windows.Forms.MainMenu mnuList;

        public FormOptions()
        {
            InitializeComponent();
            ResizeComponents();
            ResizeChildComponents();
        }

        public void ResizeChildComponents()
        {
            if (pnOptions.Controls.Count == 1)
                pnOptions.Controls[0].ClientSize = new Size(pnOptions.ClientSize.Width, pnOptions.ClientSize.Height);
        }

        public void CenterPanel(Panel panel)
        {
            int top, left;
            left = pnOptions.ClientSize.Width / 2 - panel.ClientSize.Width / 2;
            top = pnOptions.Height / 2 - panel.ClientSize.Height / 2;
            panel.Location = new Point(top, left);
        }

        private void ResizeComponents()
        {
            this.pnOptions.ClientSize = 
                new Size(this.ClientSize.Width, this.ClientSize.Height * 70 / 100);

            lblInfo.Top = pnOptions.ClientSize.Height;
            lblInfo.ClientSize = 
                new Size(this.ClientSize.Width, this.ClientSize.Height - this.pnOptions.ClientSize.Height);
        }

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.mnuList = new System.Windows.Forms.MainMenu();
            this.mnuPrevious = new System.Windows.Forms.MenuItem();
            this.mnuNext = new System.Windows.Forms.MenuItem();
            this.pnOptions = new System.Windows.Forms.Panel();
            this.lblInfo = new System.Windows.Forms.Label();
            // 
            // mnuList
            // 
            this.mnuList.MenuItems.Add(this.mnuPrevious);
            this.mnuList.MenuItems.Add(this.mnuNext);
            // 
            // mnuPrevious
            // 
            this.mnuPrevious.Text = "Previous";
            // 
            // mnuNext
            // 
            this.mnuNext.Text = "Next";
            // 
            // pnOptions
            // 
            this.pnOptions.Location = new System.Drawing.Point(0, 0);
            this.pnOptions.Size = new System.Drawing.Size(176, 115);
            // 
            // lblInfo
            // 
            this.lblInfo.BackColor = System.Drawing.SystemColors.Info;
            this.lblInfo.Font = new System.Drawing.Font("Nina", 8F, System.Drawing.FontStyle.Regular);
            this.lblInfo.Location = new System.Drawing.Point(0, 118);
            this.lblInfo.Size = new System.Drawing.Size(176, 61);
            this.lblInfo.Text = "lblInfo";
            this.lblInfo.TextAlign = System.Drawing.ContentAlignment.TopCenter;
            // 
            // FormOptions
            // 
            this.ClientSize = new System.Drawing.Size(176, 180);
            this.Controls.Add(this.pnOptions);
            this.Controls.Add(this.lblInfo);
            this.Font = new System.Drawing.Font("Nina", 8F, System.Drawing.FontStyle.Regular);
            this.Menu = this.mnuList;
            this.Text = "Options";

        }

        #endregion
    }
}
